package com.example.chapter09;

import java.util.StringTokenizer;

public class test7 {
    public static void main(String[] args) {
        String text = "apple,banana;orange";
        StringTokenizer tokenizer = new StringTokenizer(text, ",;", true);
        while (tokenizer.hasMoreTokens()) {
            System.out.println(tokenizer.nextToken());
        }

        String text2 = "apple";
        boolean isMatch = text2.matches("[a-z]+");
        System.out.println(isMatch);
    }
}
